<?php
header("Content-type:text/html;charset=utf-8");
require_once('../system/myFunc.php');
require_once('../system/dbConn.php');
connect();
if(!empty($_FILES["sqh_jiajulink"]["name"])){
	$pic = uploadfile('sqh_jiajulink','../upload/',array('jpg','gif','png','jpeg'));
}
else{
	$pic='';
}


$data=array(
	'sqh_name'=>trim($_POST['sqh_name']),
	'sqh_cid'=>$_POST['sqh_cid'],
	'sqh_jiajulink'=>$_POST['sqh_jiajulink'],
	'sqh_intro'=>$_POST['sqh_intro'],
	'sqh_adddate'=>$_POST['sqh_adddate'],
	'sqh_brand'=>$_POST['sqh_brand'],
	//'sqh_ischecked'=>$_POST['sqh_ischecked'],
	//'address'=>$_POST['address']
	);
$result=add('jiaju',$data);
if(!$result){
	echo "添加失败！<br/>";
	echo "<a href='jiaju'>返回</a>";
}
else{
	redirect('list.php','添加成功!');

}

 ?>
